{extend name="public:base" /}
{block name="style"}
<link rel="stylesheet" type="text/css" href="__INDEX__/css/public.css">
<link rel="stylesheet" type="text/css" href="__INDEX__/css/style.css">
<link rel="stylesheet" type="text/css" href="__INDEX__/css/responsive.css">
<link rel="shortcut icon" href="__INDEX__/images/favorite.ico">
<link rel="stylesheet" type="text/css" href="__COMMON__/css/style.css">
<style>
    .wfwb ul li{width: 90%;margin: auto;padding: 5%;background:#de484f;border-radius: 5px;box-sizing: border-box;margin-top:10px;box-shadow:3px 3px 8px #ccc;}
    .wfwb ul li p{text-align: center;color: #fff;font-size:18px;margin-top:10px;}
    .wfwb ul li .xiangx span{font-size: 20px;color: #fff;}
    .wfwb ul li .xiangx>i{font-style:normal;color: #fff;margin-left: 10px;font-weight: 300;}
    .wfwb ul li .xiangx a{float: right;}
    .wfwb ul li .xiangx a i{color: #fff;}
    .tianjian{display: block;width: 90%;margin: auto;background: #e27a7f;
    color: #fff;padding: 10px 0;border-radius: 5px;box-sizing: border-box;margin-top:20px;}
    .tianjian i{font-size: 20px;text-align: center;display: block;margin: auto;color:#fff;}
</style>
{/block}
{block name="html"}
{include file="index@public/main" /}
<div class="right_style">
    <h3 class="title_style"><em></em><span>我的银行卡</span></h3>
<!-- <h1 class="h1">我的银行卡</h1> -->
<div class="wfwb">
    <ul>
        {volist name="list" id="v"}
        <li>
            <div class="xiangx">
                <span>{$v.bank}</span>
                <i>{$v.branch}</i>
                <a href="javascript:;" onclick="delCardFuc('{$v.id}')"><i class="iconfont icon-lajixiang"></i></a>
            </div>
            <p>{$v.card_num}</p>
        </li>
        {/volist}
    </ul>
    <a class="tianjian" href='{:url("Deposit/card")}'>
        <i class="iconfont icon-jiahao">添加银行卡</i>
    </a>
</div>
</div>
{/block}
{block name="javascript"}
<script src="__INDEX__/js/jquery-1.9.1.min.js"></script>
<script src="__INDEX__/js/public.js"></script>
<script src="__INDEX__/layer/layer.js"></script>
<script src="__COMMON__/js/area.js"></script>
<script src="__COMMON__/js/select.js"></script>

<script type="text/javascript">

    function delCardFuc(id){
        layer.open({
            content: '你确定要删除掉吗？'
            ,btn: ['确定', '取消']
            ,yes: function(index){
                layer.closeAll();
                $.ajax({
                    type: 'POST',
                    url: '{:url("Deposit/del_card")}',
                    dataType: 'json',
                    data: {id: id},
                    success: function (data) {
                        layer.open({
                            content: data.msg
                            ,style: 'color:#ffffff;border:none;'
                            ,time: 2 //2秒后自动关闭
                            ,end:function(){
                                location.reload();
                            }
                        });
                    }
                });
            }
            ,no:function(index){
                //取消
                layer.closeAll();
            }
        });
    }

</script>


{/block}
